
package com.cc.springboot;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.w3c.dom.ls.LSInput;

@Controller
public class IndexControler {

	@RequestMapping("/index")
	public String index(ModelMap map) {
		map.addAttribute("name", "kevin");
		map.put("sex",1);//0 男 1 女 其他
		List<String> userList=new ArrayList<String>();
		userList.add("hubbert");
		userList.add("cai");
		userList.add("xu");
		map.addAttribute("userList", userList);
		return "index";
	}

}
